package com.vogue.supplymall.payment.dto;

import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 调用支付接口传入的参数_订单明细详情
 * 
 * @author 崔岳
 *
 */
public class InputParameterOrderItem extends ValidationDTO implements Serializable{

	/**
	 * 验证有效值的字段集合
	 */
	@SuppressWarnings("serial")
	public static final Map<String, List<Object>> valueValidityMap = new HashMap<String, List<Object>>() {{
		 put("isdis", Arrays.asList((new Integer[]{0, 1})));
	}};
	
	/**
	 * 验证必填字段的集合
	 */
	public static final List<String> requiredList = Arrays.asList((new String[]{
		"itemid", "itemname", "itemcount", "price"
	}));
	
	/**
	 * 菜品id(必填)
	 */
	private String itemid;
	
	/**
	 * 菜品编码
	 */
	private String code;
	
	/**
	 * 菜品名称(必填)
	 */
	private String itemname;
	
	/**
	 * 菜品数量(必填)
	 */
	private Integer itemcount;
	
	/**
	 * 菜品单价(必填)
	 */
	private Double price;
	
	/**
	 * 是否优惠 0:否(默认) 1:是
	 */
	private Integer isdis = 0;

	/**
	 * 菜品id(必填)
	 */
	public String getItemid() {
		return itemid;
	}

	/**
	 * 菜品id(必填)
	 */
	public void setItemid(String itemid) {
		this.itemid = itemid;
	}

	/**
	 * 菜品编码
	 */
	public String getCode() {
		return code;
	}

	/**
	 * 菜品编码
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * 菜品名称(必填)
	 */
	public String getItemname() {
		return itemname;
	}

	/**
	 * 菜品名称(必填)
	 */
	public void setItemname(String itemname) {
		this.itemname = itemname;
	}

	/**
	 * 菜品数量(必填)
	 */
	public Integer getItemcount() {
		return itemcount;
	}

	/**
	 * 菜品数量(必填)
	 */
	public void setItemcount(Integer itemcount) {
		this.itemcount = itemcount;
	}

	/**
	 * 菜品单价(必填)
	 */
	public Double getPrice() {
		return price;
	}

	/**
	 * 菜品单价(必填)
	 */
	public void setPrice(Double price) {
		this.price = price;
	}

	/**
	 * 是否优惠 0:否(默认) 1:是
	 */
	public Integer getIsdis() {
		return isdis;
	}

	/**
	 * 是否优惠 0:否(默认) 1:是
	 */
	public void setIsdis(Integer isdis) {
		this.isdis = isdis;
	}

	@Override
	List<String> requiredFieldList() {
		return requiredList;
	}

	@Override
	Map<String, List<Object>> valueValidityMap() {
		return valueValidityMap;
	}
}
